<? 
if (!defined('SMF'))
	die('Hacking attempt...');

global $txt;
global $release_version, $game_name, $mine_hullsize, $ewd_maxhullsize;
global $sector_max, $link_max, $fed_max_hull, $allow_ibank;
global $ibank_interest, $ibank_loaninterest, $basedefense, $colonist_limit;
global $max_turns, $max_planets_sector, $max_traderoutes_player;
global $colonist_production_rate, $energy_per_fighter, $defence_degrade_rate;
global $min_bases_to_own, $interest_rate, $fighter_prate, $torpedo_prate;
global $ore_prate, $organics_prate, $goods_prate, $energy_prate, $credits_prate;
global $sched_ticks, $sched_turns, $sched_igb, $sched_news, $sched_planets;
global $sched_ports, $sched_ranking, $sched_degrade, $sched_apocalypse;

bigtitle('');

echo '
	<script type="text/javascript">
		$(document).ready(function(){
			// Table sorting function
			$(".bnt_table").tablesorter({
				headers: { 
					0: {sorter: false}, 
					1: {sorter: false}
				},
				widgets: ["zebra"]
			});
		});
	</script>
	<table class="bnt_table">
		<thead>
			<tr>
				<th colspan="2">', $txt['bnt_settings_title'], '</th>
			</tr>
		</thead>
		<tr>
			<td>', $txt['bnt_settings_version'], '</td>
			<td>', $release_version, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_name'], '</td>
			<td>', $game_name, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_mine_hullsize'], '</td>
			<td>', $mine_hullsize, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_ewd_maxhullsize'], '</td>
			<td>', $ewd_maxhullsize, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sector_max'], '</td>
			<td>', Number($sector_max), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_link_max'], '</td>
			<td>', $link_max, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_fed_max_hull'], '</td>
			<td>', $fed_max_hull, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_fed_max_hull'], '</td>
			<td>', $fed_max_hull, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_bank_enabled'], '</td>
			<td>';
$bank_enabled = $allow_ibank ? "Yes" : "No";
echo $bank_enabled, '</td>		
		</tr>';
		
if ($allow_ibank)
{
	echo '
		<tr>
			<td>', $txt['bnt_settings_ibank_interest'], '</td>
			<td>', $ibank_interest * 100, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_ibank_loaninterest'], '</td>
			<td>', $ibank_loaninterest * 100, '</td>
		</tr>';
} 

echo '
		<tr>
			<td>', $txt['bnt_settings_basedefense'], '</td>
			<td>', $basedefense, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_colonist_limit'], '</td>
			<td>', Number($colonist_limit), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_max_turns'], '</td>
			<td>', Number($max_turns), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_max_planets_sector'], '</td>
			<td>', $max_planets_sector, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_max_traderoutes_player'], '</td>
			<td>', $max_traderoutes_player, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_colonist_production_rate'], '</td>
			<td>', $colonist_production_rate, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_energy_per_fighter'], '</td>
			<td>', $energy_per_fighter, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_defence_degrade_rate'], '</td>
			<td>', $defence_degrade_rate * 100, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_min_bases_to_own'], '</td>
			<td>', $min_bases_to_own, '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_interest_rate'], '</td>
			<td>', Number(($interest_rate - 1) * 100 , 3), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_fighter_prate'], '</td>
			<td>', Number((1 / $colonist_production_rate) / $fighter_prate), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_torpedo_prate'], '</td>
			<td>', Number((1 / $colonist_production_rate) / $torpedo_prate), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_ore_prate'], '</td>
			<td>', Number((1 / $colonist_production_rate) / $ore_prate), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_organics_prate'], '</td>
			<td>', Number((1 / $colonist_production_rate) / $organics_prate), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_goods_prate'], '</td>
			<td>', Number((1 / $colonist_production_rate) / $goods_prate), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_energy_prate'], '</td>
			<td>', Number((1 / $colonist_production_rate) / $energy_prate), '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_credits_prate'], '</td>
			<td>', Number((1 / $colonist_production_rate) / $credits_prate), '</td>
		</tr>
	</table>
	<table class="bnt_table">
		<thead>
			<tr>
				<th colspan="2">', $txt['bnt_settings_title_sched'], '</th>
			</tr>
		</thead>
		<tr>
			<td>', $txt['bnt_settings_sched_ticks'], '</td>
			<td>', $sched_ticks,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_turns'], '</td>
			<td>', $sched_turns,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_def'], '</td>
			<td>', $sched_turns,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_xen'], '</td>
			<td>', $sched_turns,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>';

if ($allow_ibank)
	echo ' 
		<tr>
			<td>', $txt['bnt_settings_sched_igb'], '</td>
			<td>', $sched_igb,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>';
		
echo '
		<tr>
			<td>', $txt['bnt_settings_sched_news'], '</td>
			<td>', $sched_news,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_planets'], '</td>
			<td>', $sched_news,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_ports'], '</td>
			<td>', $sched_ports,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_turns'], '</td>
			<td>', $sched_turns,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_ranking'], '</td>
			<td>', $sched_ranking,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_degrade'], '</td>
			<td>', $sched_degrade,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
		<tr>
			<td>', $txt['bnt_settings_sched_apocalypse'], '</td>
			<td>', $sched_apocalypse,' ',$txt['bnt_settings_sched_minutes'], '</td>
		</tr>
	</table>';

if (CheckLogin() == false)
	TextPlayerNotFound();
else
	TextMainMenu();

?>
